package lumis.util.security;

import org.w3c.dom.Node;

/**
 * Defines the methods an encryptor must implement.
 * 
 * @version $Revision: 11180 $ $Date: 2009-12-04 18:13:02 -0200 (Fri, 04 Dec 2009) $
 * @since 4.0.0
 * 
 * @deprecated Since 5.5.0, replaced by the
 * {@link lumis.portal.crypto} package.
 */
@Deprecated
public interface IEncryptor 
{
	/**
	 * This method is called only once and before any other method are called.
	 * This allows the encryptor to initialize itself and read any
	 * custom configuration.
	 */
	public void init(Node configuration) throws Exception;
	
	/**
	 * Encrypts a string.
	 * @param value the original string.
	 * @return the encrypted string.
	 * @throws Exception
	 */
	public String encrypt(String value) throws Exception;

	/**
	 * Decrypts a string.
	 * @param value the encrypted string.
	 * @return the string decrypted.
	 * @throws Exception
	 */
	public String decrypt(String value) throws Exception;
}
